FBHFJ Welcome to PtGen's On-line Help PtGen, a Prototype Generator for Turbo Pascal programs, is a full featured program intended to help you to quickly produce programs, prototypes. A prototype is saved to disk in TP-unit source code format. PtGen can read such a file back for additional editting. H It's assumed that you are familiar with Turbo Pascal type helpscreens. You can learn about the Prototype Generator by following the build-in tutorials, by using this on-line Help system and by consulting the manual. 2 Choose any of the following for more information p Product features Machine requirements Contacting Nederware PtGen's hot-keys Mouse operation Product featurs Product features: build-in tutorials to become quickly acquainted with PtGen quickly making the most advanced menu structures, including complete helptext support creating of a statusbar comfortably creating of dialogboxes 3D TVTool support Machine requirements What you need: Borland or Turbo Pascal 7.0 Turbo Vision (included with TP 7.0) enough knowlegde of both the TVTool package if you want to use the 3D views Contact the author You can contact Berend de Boer from Nederware, the author of this program by using one of the following electronic addresses: Q fidonet: 2:281/527.23 email: berend@beard.nest.nl compuserve: 100120,3121 or by regular mail (until August 1994): P Nederware c/o Berend de Boer Burgerstaaat 22 5311 CX GAMEREN HOLLAND PtGen's hot-keys Operation of PtGen is consistent throughout the program. Alt-F5 Pop-up local position menu for positioning the current object Alt-F10 Pop-up local menu Ctrl-F7 Delete current object/item Ctrl-F8 Edit current object/item Ctrl-F9 Link other objects to current object Ins Insert an item Del Delete an item See also mouse operation Ptgen Mouse operation in PtGen Left button Click on background to pop up the local menu Right button Click on object to pop up a menu with actions you can apply to that object or item. Sometimes no menu exist and the right button click goes directly into the edit mode for this object. See also hot Ptgen TVTool The TVTool 2.0 package contains among others 3D widgets for Turbo Vision. J If you have TVTool you can use PtGen to design complete 3D dialog boxes. q The author of TVTool is Richard Hansen and he can be reached at compuserve as 70242,3367 or by regular mail at: 3 PO Box 18571 Saint Paul, MN 55118-0571 USA [ OK ] Choose this button to confirm this dialog box. K If this is the default button, you only need to press Enter to choose it. [ Cancel ] If you choose Cancel, nothing changes and no action occurs, but the dialog box is put away. W Esc is always a keyboard shortcut for Cancel even if a Cancel button does not appear. [ Yes ] Press Y for Yes, or click the Yes button, to continue the initiated action. [ No ] Press N for No, or click the No button, to cancel the initiated action. File (Alt-F) The File menu offers choices for opening and loading existing files, creating new files, saving files, and exiting PtGen. Edit (Alt-E) Edit a new or a loaded application. You may also press Edit (Ctrl-F8). App (Alt-A) Set application options like application name, language (dutch or english), if it uses help, etc. File Open (F3) Load a previously saved application. Q PtGen only accepts source code that conforms entirely to the source it creates. [ You can edit the source code, but be carefull not to introduce not-PtGen compatible code. File New creates a new application. You are prompted to specify characteristics of this new application. File Save (F2) The Save command saves the application to disk. If the file has no name, PtGen opens the Save File As dialog box so you can rename the file and save it in a different directory or on a different drive. File Exit (Alt-X) The Exit command exits PtGen, removes it from memory, and returns you to DOS. ` If you've modified a source file without saving it, PtGen prompts you to do so before exiting. Enter the name of the application. Omit the proceeding 'T' (convention of Turbo Pascal) as PtGen will add a T to every objectname when writing the source file. T The name you enter will become the name of the application object you will create. Default language When you choose the default language option (the default) you use DEFAULT.TVR and DEFAULT.TXT. Copy ENGLISH.TVR or DUTCH.TVR to DEFAULT.TVR when you create only or mostly english or dutch applications. In this manner you don't have to change this option everytime you create a new application. You can use the default language option to use a different language too. Create a DEFAULT.TVR and DEFAULT.TXT containing the strings and texts in the language you wish. English language Use the english language for this application. t The file ENGLISH.TVR will be used as the base file for STRINGS.TVR, the string resource file for this application. Dutch language Maak gebruik van de nederlandse taal voor deze applicatie. q De file DUTCH.TVR zal worden gebruikt als basis voor STRINGS.TVR, de string resource file voor deze applicatie. Settings Change dialog box settings like its name and title. Listviewer Place a dummy listviewer on this dialog box. The created code can be changed by pressing the code button in the listviewer edit dialog box. Spinbutton Place a spinbutton (one line radiobutton) on its owner. Radiobuttons Place a radiobutton view on its owner. Checkboxes Place a Checkboxes view on its owner. Memo Place a memo view on its owner. Label Label an already inserted view. After you have specified the labeled text, you should select the view to be labeled. e Select that view by clicking on it with the mouse button or using Tab/Shift-Tab and pressing Enter. Static text Place text on its owner. Button Create a button yourself. Buttons Place a button on the current dialog box. Choose between user defined and predefined as OK or Cancel. You are prompted to specify a string resource file (.TVR) and a identifier file (.PAS or .INC). ~ The strings from in the resource file should be saved as 'Strings'. The strings are copied into the current string resource. > The identifiers are copied into the current identifier file. T In this way you can quickly merge different string resources and identifier files. App configuration Specify configuration settings for the application you are creating. Code Change the generated code for this view. You can change both the code that will be generated in the constructor of its owner and the code that will be generated in the record for its owner. Range validator A range validator checks the input the user types and restricts it to longints only which should be between the specified Min and Max value. Inputline Access to various inputlines, as the standard TInputLine and the PtGen TXInputLine PtGen now supports the TbxXXXXLine inputlines. They are part of TVTool and you need TVTool to be able to compile the resulting program. Validator Add a validator to an already inserted inputline. You can choose between different validators. L Select a validator, next select the inputline which needs to be validated. Note that already existing validators are disposed. The Validator option is meant to change the validation of an inputline or to upgrade inputlines of previous versions of PtGen. Enter the name of the source helptext file for this application. Usually this will be something like MYHELP.TXT. K You should call TVHC to convert this file to the corresponding .HLP file. Specify size of the editorbuffer in paragraphs (1 paragraph = 16 bytes). D Usually a value of 2 000 will suffice (16 x 2 000 = 32 000 bytes). (System) menu (Alt-Spacebar) The System menu appears on the far left of the menu bar and is represented by the symbol. < When you pull down the menu, you see the system command: About About ProtoType Generator When you choose the About command from the (System) menu, a dialog box appears, showing copyright and version information. 8 Press Esc, click OK, or click Cancel to close the box. File Save As... Give a new name to the source file for the current application. Before writing, PtGen checks if a file with such a name exist. If so, you're prompted if you want to overwrite it. When you choose Yes, the previous file is saved with the .BAK extension. If you choose No, you're prompted for another filename. Tutorial (Alt-T) PtGen contains three online tutorials: H Creating menubars Creating statuslines Creating dialogboxes They quickly and conveniently learn you to work with PtGen. Choose the Introduction first to learn the basics of working with PtGen. Tutorial Introduction Introduction to working with PtGen for mouse and keyboard users. You learn about PtGen's mouse buttons and about its hotkeys. 0 You are introduced to some basic concepts too. Tutorial Statusline Learn conveniently to create statuslines in PtGen. This tutorial is the same as found in the manual except that the manual contains a bit more explanation and discusses some more advanced concepts. Tutorial MenuBar Learn conveniently to create menubars in PtGen. This tutorial is the same as found in the manual except that the manual contains a bit more explanation and discusses some more advanced concepts. Tutorial Dialogbox Learn conveniently to create dialogboxes in PtGen. This tutorial is the same as found in the manual except that the manual contains a bit more explanation and discusses some more advanced Total number of columns for this TListViewer object. Reporter Not included in this version of PtGen. Schema creation Create a semantic abstraction hierarchie. Not included with this version of PtGen. Helptext Add, edit or delete helptexts. You can change the statusline hints as well as the helpwindow text. G You can also use it to change the constant values of the hcConstants. Objects Display all the objects which are created for this application. You can add, edit or delete objects. Statusline Edit the statusline. Validator error text Specify the resource string identifier which contains the custom warning string for this validator. Specify only an identifier if you want to override the default. If you want to change the default message itself, change ENGLISH.TVR (or any of the other string resource files like DUTCH.TVR). Dialog settings Change dialog settings like its name and title. You can specify the help text too which should appear when the Help button (if inserted) is pressed. Button In this dialog box you can define the characteristics of a button. * All button flags (bfXXXX) are supported. Lefthand Specify the local variable the view is assigned to. Before the view is inserted into its owner it is first assigned to a variable. You can use this variable to acces the view later on. Parameters Specify the parameters for this view. For some views you can only specify the extra parameters. The fixed parameters are not visible. h A fixed parameter is for example the Bounds of a view. This is always needed so you can't change that. Pointer name The object type that should be allocated. For example for an inputline you can specify PRealInputLine PtGen will in that case not write code to insert an inputline into its owner but to insert a RealInputLine. PtGen will write something like: " New(PRealInputLine, Init(..)); Helptext Enter the helptext which should be displayed as hint on the statusline when this item is selected. HelpWindow Help displayed when Help (F1) is pressed. ] This text is written to the helpfile you specified. Compile with TVHC to get the .HLP file. You can insert, edit or delete objects. 3 * Insert an object by pressing Ins or by clicking on the New button. * Edit an object by selecting it and pressing - Ctrl-F8 or by clicking on the Edit button. * Delete on object by selecting it and pressing , Ctrl-F7 or by clicking on the Del button. You can insert, edit or delete statusline items. - * To insert, press Ins or click on the New button * To edit, select the item and press Edit ( (Ctrl-F8) or click on the Edit button * To delete, select the item and press Del or click on the Del button Insert an item. Delete an item. Enter the text which will be displayed on the statusline. Enter the keycode to generate the command which you will enter below. Valid keycodes are kbF1, kbF2, kbAltA etc. Command to generate when keycode is pressed. Enter the text to display for this item. Surround the hotkey with tildes (~). Command to generate when this item is selected. This command will be listed in the interface section of the unit you create so you can use it in your programs. Enter the helptext which should be displayed on the statusline when this item is selected. hcXXXX Enter the name which will be used to refer to this particular statusline helptext and helptext window. This is useful for crossreferencing. When no hcConstant is specified a default one is created. The default one consists of a 'H' + the value of the helpcontext. For example: H2022 or H2072. You can modify the stringslist by clicking on the New/Edit/Del buttons or by pressing Ins, Edit (Ctrl-F8) or Del. Enter the static text you want to display. You may enter the ^C and ^M directives by typing first a '^' than a 'C' or 'M'. 9 ^C will center the text ^M will go to the next line Characters lower than ascii 32 are not supported. Enter the text for the label. Characters surrounded by tildes (~) are highlighted. Enter the text to display on the button. You can use tildes (~) to highlight certain characters. Command to generate when button is selected. command will be listed in the interface section of the unit you create so you can use it in your programs. Code dialog box This dialog box lets you change the code that will be generated for the selected subview. Menuitem dialog box Edit this menuitem by filling in the various fields. Unitnames Insert, edit or delete units by pressing Ins, Edit (Ctrl-F8) or Del respectively. # Or press the appropriate buttons. Units dialog box You can insert, edit or delete the units that will appear as the last units in the implementation uses clause in the created unit. In this manner you can `import' your views into the created code. Press the code button when you create a view (for example an inputline) to change the generated code. Units Specify units to be included in the implementation clause of the to be created unit. q If you make use of the user generated code you usually need to include units of your own which define the view. STRINGS.TVR The file STRINGS.TVR contains all strings for this application including the statusline hints. Q Using string resources internationalizing your application becomes much easier. ; Use the BBStRRes unit for easy acces to string resources. Cluster Dialog box Enter Cluster item string including its hint and a helptext to be shown when Help (F1) is pressed. HelpItems Insert, edit or delete helpitems. q You can change the identifier (hcConstant), the value of the hcConstant, the helptext and the help window text. Calculator Use the calculator object with your application. This is the same calculator as found in CALC.PAS which came with your Borland package. 3 It should be somewhere in the examples directory. Center Y Center X Make First Make this view the first view (lowest in Z-order) of this dialog box. Specify next view Specify the view that should be come next after this view. Use this option to specify the Tab/ Shift-Tab path through your dialog box. 5 That view becomes higher in Z-order than this view. Enter the name of the dialog box while omitting the usually preceding 'T'. PtGen adds a 'T' when writing the source file. J This name will be exported in the interface section of the created unit. Enter the title which will appear at the top of the dialog box. All characters, up to 30, should be supported. Strings (Alt-S) Edit the string resources for this application. This string resource editor for Turbo Vision is very much like the Windows resource editor. E Strings are saved in .TVR files, identifiers in .PAS or .INC files. String resource files dialog box This is the string resource files main dialog. You can add string resource files, delete or edit them. g When your application is saved, one big string resource file is created with the name 'STRINGS.TRV'. String resources file list This is the main list of all the string resource files this application uses. z You can add, delete or edit files by pressing Ins, Del or Edit (Ctrl-F8) or by clicking on the New, Del or Edit buttons. [ New ] A file dialog box will pop up to help selecting a string resource file and a identifier file. [ Edit ] After choosing edit, the selected string resource file can be editted. < Strings with identifiers can be added, edited, or deleted. [ Delete ] The selected string resource file is deleted from the files list. The copy on your disk is not deleted. Resource strings You can add, change or delete strings in this string resource file. This file will be included in the main string resource file (STRINGS.TVR) for this application. Edit a resource string You can add, edit or delete strings by pressing Ins, Edit (Ctrl-F8) or Del respectively or by clicking on the New, Edit or Delete buttons after you have selected an item. d For each item you can specify the name of the constant, the value of that constant and the string. H NOTE: The value of the constant should be unique for this application. Insert a string. You have to specify constant name, value and the string itself. Edit a string. You can change the name of the constant, its value and the string itself. Delete the selected string. Resource String You can edit the name of the constant of this string, the value of the constant and the string itself. Resource Constant Name Specify the constant name. This name will be put into the include file 'STRINGS.INC'. This file is created when you save your application. t For example, when you specify as name sOutOfMemory and as a value for this constant 100, the output will be: const sOutofMemory = 100; To discriminate between other constants and string recource constants the 's' prefix is suggested. Resource Constant Value Specify the constant value. This value will be put into the include file 'STRINGS.INC'. This file is created when you save your application. t For example, when you specify as name sOutOfMemory and as a value for this constant 100, the output will be: const sOutofMemory = 100; NOTE: Don't use values within the PtGen value range (1000..3999). All texts are stored in one string resource file so each string should be assigned a unique identifier. Resource string Specify the resource string itself. You can embed %d, %s or other format specifiers. / A maximum of 255 characters can be specified. File Change Dir... Change Dir brings up the Change Directory dialog box, where you can specify a directory to make current. R The current directory is the one PtGen uses to save files and to look for files. TInputLine The TInputLine view is the normal TurboVision view. Full validator support is provided. Objects dialog box The objects dialog box shows all objects defined for this application. You can edit, delete or insert new objects. Picture validator Real validator A real validator checks if the entered string corresponds to the TurboPascal real type. Let the validator do the DataSize, GetData and SetData methods. TbxByteEdit dialog box Help Enable this option if you want to use helptexts in your application. Enabling this option will cause PtGen to put the Help directive in DEFINES.DEF which will cause the help code in PREAPP.PAS to be compiled. Editor Enable if you want to use the Editors unit in your application. Bufferend Printer Not supplied with this release. 3D Turbo Vision Enable to support the TVTool package of Richard Hansen. TVTool lets you create Three Dimensional dialog boxes. Dialog|Open Read a previous saved single dialog. Dialog|Create Create a single dialog without creating a whole application. You don't have to choose File|New but can directly execute Dialog|New Dialog (Alt-D) Acces to dialog only functions. No application is created. . Only a single dialog source file is created. In this operation mode, PtGen resembles DlgDsn in the way that only dialogs can be created and written. However, you retain the full editing power of PtGen. Use a function of a DLL in your application. In the protected mode version of PtGen you can directly acces this function. The real mode version can write the code to access a DLL only. Popup menu Create a complete popup including full helptext and statusline hint support. Status item dialog box Identifier Fill in a record identifier. Initially this record identifier is equal to the label of this view. This identifier is written in the record structure for this dialog box which can subsequently be used by GetData and SetData. Record identifier type Enter the record identifier type. Most of the time this type is automatically provided by the view itself, but you can override this. Center X Center this view horizontally within its owner's boundaries. Center Y Center this view vertically within its owner's boundaries. Create a record Create a record for this dialog box for use with GetData and SetData. $ The created record is of the form: e Rec = record : ; : ; ... end; The subviews know their types. If you have labeled the subviews their identifier will be equal to their label. You can override this default settings though. 3D dialog box Create a three dimensional dialog box with three dimensional subviews. You need TVTool 2.0 to compile such programs. ValidChars Enter the set of all characters the user can type. For example to allow only numeric digits, type '0'..'9' To allow only uppercase characters type 'A'..'Z' Clone Create an almost identical copy of the current selected object. Picture Enter the format for the type of string the user has to enter. A picture may consist of the following characters: (note that / stands for a curlet brace) - Type of character Character Description Special # Accept only a digit ? Accept only a letter (case-insensitive) & Accept only a letter, force to uppercase @ Accept any character ! Accept any character, force to uppercase Match ; Take next character literally * Repetition count A number after the '*' specifies how many the next character should be repeted [] Option // Grouping operators , Set of alternatives All others Taken literally Examples (from the TVTool package): % - unsigned int with optional commas #[#][#]*/[;,]###/ - dollars, with comma and optinal dollar sign [$]*#./##,00/ - phone number with optional area code [(###) ]###-#### - filename (no path) with extension /&*7[&]/./*3[&]/ None Don't use a validator. Filter validator Add the TFilterValidator to this inputline. Range validator Add a range validator to this inputline. Real validator Add a real validator to this inputline to let the user input a TurboPascal real type. b The real validator is identical to the RangeValidator except that a real range can be specified. Picture validator Add the TPXPictureValidator to this inputline. TXinputLine The TXInputLine is defined in BBDLG.PAS, a unit that came with your PtGen package. P TXInputLine supports the word left and right (Ctrl-Left and Ctrl-Right) keys. Cut & Paste is also possible. Validate on append Set if you want to validate on append only. This option is there to save your users from some unexpected, although logical, behaviour. m An example might clarify this. Let your picture be $##.##. Let this option be on. If your user has entered $23. he can place the cursor on '2' and enter a 'a' so the input becomes $2a3. This is valid because you specified that the input should be checked on append only. If you have turned this option off, this could not happen. But, assuming the original input, if the user places his cursor on the '2' and wants to delete it, that will not be possible, because the then existing string violates the picture. The user can only delete characters in this case when he starts deleting them at the end of the input using backspace. Your choice. TbxEditLine The TbxEditLine is part of TVTool. You need TVTool to compile the unit that PtGen will write. InputLine Dialog Box MaxLen Specify the maximum number of characters one can type in this inputline. EditLine Dialog Box EditLine Dialog Box. Minimum allowed value for this real. Maximum value allowed for this real. TbxByteEdit Insert TVTool's TbxByteEdit inputline. TbxIntegerEdit Insert TVTool's TbxIntegerEdit inputline. dfRequired Field entry is required. dfRJustify Trim and right justify result. dfLJustify Trim and left justify result. dfTrim Remove leading and trailing spaces from result. Hide Typed characters are not visible on the screen, instead the HideChar (default '*') character is written of any typed character. dfDefaults Use default values if available. Currently (TVTools 2.00) only applicable for use with the TbxDateEdit inputline to set a specified day, month or year to the current day, month or year (if SetDateDefaults has been called). Mask Specify the mask to use for this inputline. the mask characters are: V X any character U any character, force to uppercase L any character, force to lowercase a alpha numeric character only u alpha numerIc character only, force to uppercase l alpha numeric character only, force to lowercase # numbers, minus, period 9 digit only & hexadecimal numbers @ dates Examples: Date: 99/99/9999 Phone number: (999) 999-9999 [9999] Money: $#####.## Hexadecimal: &&&& TbxIntegerEdit dialog box The minimum should be between -32768 and 32767. The maximum allowed value should be between -32768 and 32767. TbxDateEdit dialog box Date picture In the date picture teh characters 'y', 'Y', 'm', 'M', 'd' and 'D' are used to specify the positions of the year, month and day in the input string. p Tne only editable characters in the input line will be in the positions indicated by these special characters. Examples: $ MM/DD/YY mm/dd/yyyy dd/mm/yy If dfDefault is set, missing data will be filled in using DefaultYear, DefaultMonth and DefaultDay (set these using SetDateDefaults). TbxDateEdit TbxDateEdit implements an input line for formatted dates. ? You need the TVTool package to compile the resulting program. StatusDef Insert, edit or delete a status definition. StatusDef dialog box Selectable Set if view should be selectabe. ofValidate Set if the view should validate itself before giving up its focus. 1 A view can retain the focus if it is not valid. ofFramed Set this option if you want the view to be framed. File DOS Shell With the DOS Shell command, you can leave PtGen temporarily to perform a DOS command or enter another program. D To return to PtGen, type EXIT at the DOS prompt, then press Enter. HistoryID Type the history ID number to use for this inputline. You're in Point mode now Mouse users ----------- Select an object by clicking on it. Keyboard users -------------- Select an object with the arrow or Tab/Shift-Tab keys and press Enter.